public class StartXRayEvent extends EventBase {
	private PatientBase patient;
	private Nurse nurse;
		
	public StartXRayEvent(int id, PatientBase patient, Nurse nurse) {
		this.patient = patient;
		this.nurse = nurse;
	}

	public boolean canOccur(State state) {
		if(state.isRNAvailable() && state.isXrayAvailable())
			return true;
		else
			return false;
	}


	// Check this method because the nurse aspect is tricky and probably wrong
	public void execute(State s) {
		patient.setActivity(TreatmentType.XRay);
		Simulator.addEvent(new EndPatientXRayEvent(patient, Simulator.nextNormal(25, 15)));
		Simulator.addEvent(new EndNurseXRayEvent(nurse, Simulator.nextNormal(3, 2)));

	}
}
